package com.ofps.flow.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ofps.common.annotation.Excel;
import com.ofps.common.core.domain.BaseEntity;

/**
 * 流程节点对象 tb_enter_flow_node
 *
 * @author ofps
 * @date 2022-06-01
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@TableName("tb_enter_flow_node")
public class EnterFlowNode  {
    private static final long serialVersionUID = 1L;

    /**
     * 唯一标识（不太重要）
     */
    @TableId(type = IdType.AUTO)
    private String id;
    /**
     * 节点的名称
     */
    @Excel(name = "节点的名称")
    private String name;
    /**
     * 该节点对应的流程id
     */
    @Excel(name = "该节点对应的流程id")
    private String flowId;
    /**
     * 该节点在流程内的顺序
     */
    @Excel(name = "该节点在流程内的顺序")
    private Long orderId;
    /**
     * 该节点是否为最后一个节点 0不是 1是
     */
    @Excel(name = "该节点是否为最后一个节点 0不是 1是")
    private Boolean last;
    /**
     * 审核该节点的用户id
     */
    @Excel(name = "审核该节点的用户id")
    private Long relatedUserId;
    /**
     * 节点备注
     */
    @Excel(name = "节点备注")
    private String nodeInfo;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("flowId", getFlowId())
                .append("orderId", getOrderId())
                .append("last", getLast())
                .append("relatedUserId", getRelatedUserId())
                .append("nodeInfo", getNodeInfo())
                .toString();
    }
}
